package homework37;

public class CalculatorForm {
    private Command command ;
    public void setCommand(Command command){
        this.command = command;
    }

    //调用execute方法进行运算....
    public void compute(int value){
        int i = command.execute(value);
        System.out.println("执行运算...运算结果为..." + i);
    }
    //调用undo方法，进行撤销0...
    public void undo(){
        int i = command.undo();
        System.out.println("执行撤销...运算结果为...." + i);
    }
}
